﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace nb.development.csmediamanager
{
    public partial class Effects : Form
    {
        public Effects()
        {
            InitializeComponent();
        }

        public ContentAlignment Watermarkposition
        {
            get {
                if (radPosBotLeft.Checked) return ContentAlignment.BottomLeft;
                else if (radPosTopLeft.Checked) return ContentAlignment.TopLeft;
                else if (radPosTopRight.Checked) return ContentAlignment.TopRight;
                else  return ContentAlignment.BottomRight;
            }
        }

        public Color WatermarkColor { get { return colorDialog1.Color; } }

        public string Watermarktext { get { return textBox1.Text; } }

        public Font Watermarkfont { get { return fontDialog1.Font; } }

        public event EffectChangeHandler EffectChanged;

        private void button1_Click(object sender, EventArgs e)
        {
            if (fontDialog1.ShowDialog() == DialogResult.OK)
                EffectChanged();
        }

        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            EffectChanged();
        }

        private void radPosBotRight_Click(object sender, EventArgs e)
        {
            EffectChanged();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (colorDialog1.ShowDialog() == DialogResult.OK)
                EffectChanged();
        }
    }

    public delegate void EffectChangeHandler();
}
